import pymysql


class SqlManager:

    def __init__(self):
        pass
        # self.conn = pymysql.connect(
        #     host='192.168.32.137',
        #     user='root',
        #     password='123456',
        #     database='opencart',
        #     port=3306
        # )

    def get_data_from_table(self, target_value='*', table='', column='', limit=''):
        if limit:
            query = f'select {target_value} from {table} where {column}="{limit}";'
        else:
            query = f'select {target_value} from {table};'
        # cursor = self.conn.cursor()
        # cursor.execute(query)
        # result = cursor.fetchall()
        # return result


sql_manager = SqlManager()
